package com.itheima.zixi5.duoxiancheng_chuangjian.method1;

public class Test {
    public static void main(String[] args) {
        //创建任务对象
        Runnable r = new Myrunnable();
        //把任务对象交给线程对象处理，start()方法只有thread类才有
        new Thread(r).start();
        for (int i = 0; i < 5; i++) {
            System.out.println("主线程"+i);
        }
    }
}
